export class Mathf {
  static EPS = 1e-6;

  static equals(a: number, b: number) {
    return Math.abs(a - b) < Mathf.EPS;
  }

  static bigThan(a: number, b: number) {
    return a - b > Mathf.EPS;
  }

  static lessThan(a: number, b: number) {
    return a - b < -Mathf.EPS;
  }

  static isZero(n: number) {
    return Math.abs(n) < Mathf.EPS;
  }

  static deg2Rad(deg: number) {
    return (Math.PI / 180) * deg;
  }

  static rad2Deg(rad: number) {
    return (rad * 180) / Math.PI;
  }
}
